home *** CD-ROM | disk | FTP | other *** search
/ Invisible Universe / Invisible Universe (1995)(Voyager)[Mac-PC].iso / mac / MOVIES / TOUR.DIR / 00005_Script_5 < prev    next >
Text File  |  1995-11-15  |  4KB  |  163 lines

  1. on idle
  2.   showHilite
  3.   --goMovieGo
  4.   pass
  5. end idle
  6.  
  7. on exitFrame
  8.   go to the frame
  9. end
  10.  
  11. on patchpal
  12.   global gTourFixPal
  13.   if not voidP(gTourFixPal) then gTourFixPal(mPatchIt)
  14. end patchpal
  15.  
  16. on startMovie
  17.   global gCom
  18.   
  19.   set gCom = 0
  20.   
  21.   setLocalVariables
  22.   buildTourButtons
  23.   buildTourList
  24.   newTour
  25. end startMovie
  26.  
  27. on newTour
  28.   global gTourLabel, gPageIndex
  29.   global gTourTimeSS, gTourTimeCL, gTourTimeMW
  30.   
  31.   if (the frame > 1) and (the frameLabel <> "") then set gTourLabel = the frameLabel
  32.   
  33.   if voidP(gTourLabel) then put "CLS" into gTourLabel
  34.   
  35.   patchPal
  36.   go frame (label(gTourLabel)-1)
  37.   puppetTransition 50,1,120,false
  38.   go next
  39.   --addToRetrace
  40.   put 0 into gPageIndex
  41.   updateStage
  42.   
  43.   
  44.   set tourTime = -1
  45.   do "set tourTime = gTourTime"&char 1 to 2 of gTourLabel
  46.   
  47.   if tourTime >= 0 then continue
  48. end newTour
  49.  
  50. on stopMovie
  51.   global gTourFixPal
  52.   --  set the visible of sprite 9 to true
  53.   --  set the visible of sprite 10 to true
  54.   --  if the machineType <> 256 then gTourFixPal(mDispose)
  55.   --closeXlib "FixPalette.XObj"
  56.   puppetSprite 15, 0
  57.   unload
  58.   pass
  59. end stopMovie
  60.  
  61. on setLocalVariables
  62.   global gTourIsPlaying, gRetraceNames, gVolume
  63.   global gCurrChan,gFirsChan,gLastChan,gPrevHilite,gTourFixPal
  64.   if voidP(gRetraceNames) then put empty into gRetraceNames
  65.   --if voidP(gVolume) then put 7 into gVolume
  66.   set the visible of sprite 9 to false
  67.   set the visible of sprite 10 to false
  68.   if the machineType <> 256 then
  69.     openxlib "FixPalette XObj"
  70.     if voidP(gTourFixPal) then
  71.       set gTourFixPal=FixPalette(mNew, the stageLeft, the stageTop, the stageRight, the stageTop)
  72.     end if
  73.   end if
  74.   put false into gTourIsPlaying
  75.   put 0 into gPrevHilite
  76.   put 2 into gCurrChan
  77.   put 2 into gFirsChan
  78.   put 11 into gLastChan
  79. end setLocalVariables
  80.  
  81. on addToRetracexxx
  82.   global gTourList,gRetraceNames,gLastRetraceName
  83.   global gRetraceLabels, gTourLabel, gPageIndex
  84.   put the frameLabel into gTourLabel
  85.   put [] into it
  86.   do "put findpos(gTourList,#"&gTourLabel&") into it"
  87.   put getAt(getAt(gTourList,it),1) into retraceName
  88.   if gLastRetraceName = retraceName then exit
  89.   put the number of lines in gRetraceNames into nr
  90.   put gLastRetraceName into line(nr+1) of gRetraceNames
  91.   put gTourLabel into line(nr+1) of gRetraceLabels
  92.   if nr = 15 then
  93.     delete line 1 of gRetraceNames
  94.     delete line 1 of gRetraceLabels
  95.     put retraceName into gLastRetraceName
  96.   end if
  97. end addToRetracexxx
  98.  
  99. on getDescr N
  100.   --  searches the data in the list for the product then returns the description
  101.   --  you could make similar handlers for other values in the property lists.
  102.   global Data
  103.   if not listP(Data) then set Data = value(field "data")
  104.   repeat with P in Data
  105.     if the Prod of P = N then return ( the Desc of P )
  106.   end repeat
  107. end
  108.  
  109. on delay howLong
  110.   startTimer
  111.   repeat while the timer < howLong
  112.   end repeat
  113. end delay
  114.  
  115. on retraceLocal
  116.   global gTourIsPlaying
  117.   
  118.   set m = the movie
  119.   set f = the frame
  120.   
  121.   if gTourIsPlaying then 
  122.     cursor 4
  123.     set pausedTour = 1
  124.     
  125.     pauseTour 1
  126.     cursor -1
  127.   end if
  128.   
  129.   retrace
  130.   
  131.   if the movie = m then
  132.     if f = the frame then 
  133.       if pausedTour then
  134.         playTour
  135.       end if
  136.     else
  137.       updateStage
  138.       patchpal
  139.     end if
  140.   end if
  141.   
  142. end
  143.  
  144.  
  145. on doContentsLocal
  146.   global gTourIsPlaying
  147.   if gTourIsPlaying then 
  148.     cursor 4
  149.     set pausedTour = 1
  150.     pauseTour 1
  151.     cursor -1
  152.     set m = the movie
  153.     set f = the frame
  154.   end if
  155.   doContents
  156.   
  157.   if pausedTour then 
  158.     if the movie = m and f = the frame then playTour
  159.   end if
  160.   --  go movie "TOC.DIR"
  161.   --  abort
  162. end contents
  163.